<template>
	<view>

		<view class="list_box">
			<view  class="info" v-for="(item,index) in list" :key="index" >
				<view>
					<text v-if="item.plot">{{item.plot.name}}</text>
					<text v-if="item.room">{{item.room.name}}</text>
				</view>
				<view class="f_c_s time">
				<view>{{item.users.name}}</view>
				<view>{{item.users.mobile}}</view>
				</view>
				
				<view class="f_c_s time">
				<view>缴费月份:{{item.timeText}}</view>
				<view class="money">￥{{item.money}}</view>
				</view>
				
				<view class="time">缴费时间:{{item.createtime}}</view>
			
				<div></div>
			</view>
		</view>
		
		<view class="bitmap" v-if="emptyShow">
			<image :src="none" mode="aspectFit"></image>
			<view class="gray_font fs-13">
				暂无缴费记录
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				params: {
					page: 1,
					limit: 10,
					status: 0
				},
				list: [],
				total: 0,
				emptyShow: false,
				none:''
			}
		},
		onShow() {
			this.getList();
		},
		onLoad(e) {
			this.none=this.$imgUrl+'assets/img/none_order.png';
		},
		methods: {
			getList() {
				this.params.page = 1;
				this.$get(this.$api.jfRecord, this.params, res => {
					let data = res.data;

					if (!data.data.data || data.data.data.length < 1) {
						this.emptyShow = true;
					} else {
						this.emptyShow = false;
					}

					this.list = data.data.data;
					this.total = data.data.total;
				});
			},
			onReachBottom() {
				if (this.list.length < this.total) {
					this.params.page++;
					this.$get(this.$api.jfRecord, this.params, res => {
						let data = res.data;
						data.data.data.forEach(ress => {
							this.list.push(ress);
						});
					});
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	/deep/ .u-tab-item {
		background-color: transparent !important;
		font-size: 30rpx !important;
	}

    .tab_box{
		position: fixed;
		top:0;
		left:0;
		width: 100%;
	}

	.list_box {
		box-sizing: border-box;
		padding: 0 20rpx;
	}

	.info {
		margin-top: 30rpx;
		background-color: white;
		border-radius: 20rpx;
        box-sizing: border-box;
		padding: 20rpx;
	}

	.head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 15rpx 20rpx;
		font-size: 28rpx;
		border-bottom: 1rpx solid #eee;
	}
	.red{
		color: red;
	}
	.center{
		box-sizing: border-box;
		padding: 15rpx 20rpx;
		border-bottom: 1rpx solid #eee;
		
	}
	.img{
		width: 35%;
		height: 240rpx;
		border-radius: 15rpx;
	}
	.c_right{
		width: 60%;
		text-align: left;
	}
	.name{
		font-weight: bold;
	}
	.time{
		font-size: 26rpx;
		margin-top: 10rpx;
	}
	.m_box{
		font-size: 24rpx;
		text-align: right;
		
	}
	.money{
		font-size: 32rpx;
		color: red;
		font-weight: bold;
		margin-left: 20rpx;
	}
	.bottom{
		display: flex;
		align-items: center;
		justify-content: flex-end;
		box-sizing: border-box;
		padding: 20rpx 20rpx;
	}
	.btn{
		box-sizing: border-box;
		padding: 8rpx 25rpx;
		border: 1rpx solid black;
		font-size: 26rpx;
		border-radius: 25rpx;
		margin-left: 20rpx;
	}
	.btn_red{
			border: 1rpx solid red;
			color:red;
	}
	.bitmap {
		margin-top: 10vh;
		text-align: center;
	}
	.f_s{
		display: flex;
		
		justify-content: space-between;
	}
	.f_c_s{
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
</style>